<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <base th:href="@{/}">
    <title>Thymeleaf示例</title>
    <!-- import CSS -->
    <link rel="stylesheet" th:href="@{/css/default.css}"/>
    <script th:src="@{/js/jquery-3.7.1.js}"></script>
</head>
<body>
    <div>
        <h1 th:text="${message}">000</h1>
        <img class="images" th:src="@{${imageFile}}" />
        <input id="msg" type="text" th:value="${message}"/>
        <input id="btn" type="button" value="提交" />
    </div>
</body>
<script type="text/javascript">
    $(function () {
        $('#btn').click(function() {
            alert($('#msg').val());
        });
    });
</script>
</html>